import java.util.Scanner;

//https://www.nowcoder.com/practice/bd891093881d4ddf9e56e7cc8416562d?tpId=85&&tqId=29864&rp=1&ru=/activity/oj&qru=/ta/2017test/question-ranking
// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class MainOR59 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        String str = scan.nextLine() ;
        int len = str.length() ;
        int max = 0 ; 
        String maxStr = null ; 
        for(int i= 0 ; i < len ; i ++){
           char ret = str.charAt(i) ;
           if(ret >= '0' && ret <= '9'){
              int  j = i ;
              while(i < len && str.charAt(i) >= '0' && str.charAt(i) <= '9'){
                i ++ ;
              }
               if(max < i-j){
                  maxStr = str.substring(j , i ) ; 
                  max = i- j ; 
               }
           }
        }
        System.out.println(maxStr) ; 
    }
}